package com.zhanshen.controller;

import com.zhanshen.pojo.Find;
import com.zhanshen.pojo.Message;
import com.zhanshen.pojo.Result;
import com.zhanshen.service.FindService;
import com.zhanshen.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;



@Controller
public class MessageController {
    @Autowired
    private MessageService messageService;

    @RequestMapping("sp")
    @ResponseBody
    public Result speak(Message message){

        int i = messageService.speak1(message);
        if (i<=0){
            return Result.error(i,"不存在");
        }
        return Result.ok();
    }

}
